#ifndef SCRIPTSERVER_H
#define SCRIPTSERVER_H

#include <boost/python.hpp>

#include <map>
#include <list>
#include <string>

#include "sgeTypes.h"

namespace sge {

typedef boost::python::object PythonObject;
typedef std::list<PythonObject> PythonObjectList;
typedef std::map<String, PythonObject> StringPythonObjectMap;

class ScriptServer {
private:
    PythonObject* context;
    
    StringPythonObjectMap functions;
    
public:
    ScriptServer();
    ~ScriptServer();
    
    PythonObject getContext();
    PythonObject importModule(const String& name);
    String getType(PythonObject obj);
    int getLength(PythonObject obj);
    String toString(PythonObject obj);
    String dir(PythonObject obj);
    
    bool hasFunction(const String& name);
    PythonObject getFunction(const String& name);
    bool loadFunctions(const String& filename);
};

}

#endif
